function resolvUrl(url) {
  var keyValues = url.split("?")[1]
  if (!keyValues) {
    return []
  }
  var windowHref = keyValues.split("&");
  var res = []
  for(var i = 0; i < windowHref.length; i++) {
    var keyValue = windowHref[i]
    var key = keyValue.split("=")[0]
    console.log('keyvalue--', keyValue);
    console.log('key---', key);
    res.push(key)
  }
  return res
}

var url = 'www.baidu.com?k=1&l=2&h=3'
console.log(resolvUrl(url));